package com.nannybear.Model;

import com.nannybear.MainActivity;

/**
 * @brief To transmit the temperature threshold.
 */
public class TemperatureThresholdChange implements Command{
    /********** DECLARATIONS **********/
    private MainActivity activity;

    /************ METHODS ************/
    /**
     * @brief Constructor.
     */
    public TemperatureThresholdChange(MainActivity activity){
        this.activity = activity;
    }

    /**
     * @brief Execution of the temperature threshold change
     */
    public void execute(String data){
        this.activity.getTemperatureThreshold().changeThreshold(Integer.parseInt(data));
    }
}
